{{!-- <section class="panel">
    <table>
        <thead>
            <tr>
                <th>用户名</th>
                <th>密码</th>
            </tr>
        </thead>
        <tbody id="tableList">
            {{#each lists}}
            <tr>
                <td>{{username}}</td>
                <td>{{password}}</td>
            </tr>
            {{/each}}
        </tbody>
    </table>
</section> --}}

<section class="panel">     
    <h1>添加用户</h1>
    <form action="http://localhost:3000/adduser" method="POST">
    账号: <input type="text" name="username" >
    密码 ：<input type="text" name="password" >
    <input type="submit" value="添加">
    </form>
    <h1>显示用户列表</h1>
            <table>
            <thead>
            <tr>  
                <th>序号</th>
            <th>用户名</th><th>密码</th>                                           
            </tr>
            </thead>
            <tbody id="tableList" >
            {{#each userlist}}
            <tr>
                <td>{{addOne @index}}</td>
                <td>{{username}}</td>
                <td>{{password}}</td>
                 <td>{{_id}}</td>
            <td>
                <form action="http://localhost:3000/delete" 
                method="POST">
                    <input type="hidden" name="_id" value="{{_id}}">
                    <input type="submit" value="删除">
                </form>
            
            </td>
            </tr>
            {{/each}}
            </tbody>
        </table>
</section>

